package com.sen.service.impl;

import com.sen.model.entity.BmsTip;
import com.sen.mapper.BmsTipMapper;
import com.sen.service.BmsTipService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.log4j.Log4j;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 每日赠言 服务实现类
 * </p>
 *
 * @author ergou
 * @since 2021-04-07
 */
@Service
@Log4j
public class BmsTipServiceImpl extends ServiceImpl<BmsTipMapper, BmsTip> implements BmsTipService {


    @Override
    public BmsTip getRandomTip() {
        BmsTip todayTip = null;
        try {
            todayTip = this.baseMapper.getRandomTip();
        }catch (Exception e){
            log.info("tip转化失败");
        }
        return todayTip;
    }
}
